﻿$(function () {
     //当前页面输入框选中
    $('#pwd').focus();
    $(document).on('keydown', function (e) {

        switch (e.keyCode) {
            case 27:   //Esc操作
                e.preventDefault();
                var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
                parent.layer.close(index);
                parent.window.location.reload();
                break;
            case 13:    //回车
                e.preventDefault();
                var pwd = $("#pwd").val();                      //密码
                if (pwd == "") {
                    message('message.html?t=301', '300px', '200px');
                }
                else {
                    shifttest(pwd);
                }
                break;
        }
    })
});

